﻿




using Hotpot.Infrastructure;
using Hotpot.Plugins;
using Hotpot.Plugins.Extensions;

namespace Hotpot.Modules.Plugins.Extensions
{
    public static class PluginTemplateRegistryExtensions
    {
        public static void Reload(this PluginTemplateRegistry registry, IPluginEngine pluginEngine)
        {
            registry.Clear();

            foreach (PluginContainer pluginContainer in pluginEngine.GetInstalledAndEnabledPlugins())
                pluginContainer.RegisterTemplates(registry);
        }
    }
}
